//package com.lap.permission.config;
//
//import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class CircuitBreakerListener {
//
//    @Autowired
//    public void configure(CircuitBreakerRegistry registry) {
//        registry.circuitBreaker("myService")
//                .getEventPublisher()
//                .onStateTransition(event -> {
//                    System.out.printf("熔断器状态变化: %s → %s%n",
//                            event.getStateTransition().getFromState(),
//                            event.getStateTransition().getToState());
//                });
//    }
//
//}
